package ${model.packageName}.${model.modulePackage}.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

#foreach( $key in $importList.keySet() )
$importList.get($key)
#end

/**
* ${model.model}: ${model.comment} 数据领域模型
* ${date}
*@author ${model.author} 
*/
@Entity
@Table(name="${model.tableName}")
public class ${model.model} {
#foreach($field in $fieldList)
	/** 
    *@param ${field.comment} 
    */
    private ${field.type} ${field.field};
#end

#foreach($field in $fieldList)
#if(${field.isPk}=='Y')
  /** 
	* @return ${field.field} ：${field.comment}
	*/
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "${field.columnName}", unique = true, nullable = false, length = 32)
    public ${field.type} get${field.fieldUp}() {
        return ${field.field};
    }
    /** 
    *@param ${field.field} 设置${field.comment} 
    */
    public void set${field.fieldUp}(${field.type} ${field.field}) {
        this.${field.field} = ${field.field};
    }
#else
    /** 
	* @return ${field.field} ：${field.comment}
	*/
	@Column(name = "${field.columnName}")
    public ${field.type} get${field.fieldUp}() {
        return ${field.field};
    }
    /** 
    *@param ${field.field} 设置${field.comment} 
    */
    public void set${field.fieldUp}(${field.type} ${field.field}) {
        this.${field.field} = ${field.field};
    }
#end
#end
}